package com.thiscc.sum.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mongodb.DBObject;
import com.thiscc.sum.logic.CareLogic;
import com.thiscc.sum.utils.ResponseUtils;

/**
 * 总结关注
 * @author helios
 * @since 1.0
 * @time 2014-12-27
 */
@Controller
@RequestMapping("care")
public class CareController extends CommonController{

	private CareLogic careLogic = new CareLogic();
	
	/*-------------------------------------------------------------------------------------------*/
	
	/**
	 * 获取我关注的总结
	 * @param request
	 * @param response
	 * @author helios
	 */
	@RequestMapping("myCareList")
	public void myCareList(HttpServletRequest request,
			HttpServletResponse response){
		
		List<DBObject> retList = careLogic.myCareList(request, response);
		ResponseUtils.send(response, retList.toString());
	}
	
	
	/*-------------------------------------------------------------------------------------------*/
	/**
	 * @param uuid //登陆人的uuid
	 * @param oid //总结的唯一编号
	 * @param title//关注的标题
	 * @param lev//关注第几条
	 * @param ctime 发总结的时间
	 *	关注总结   确认关注
	 *	@author 易泉 2014年12月17日
	 */
	@RequestMapping("attentionPerson")
	public void attentionPerson(HttpServletRequest request, 
			HttpServletResponse response){
		
		String result = careLogic.attentionPerson(request);
		ResponseUtils.send(response, result);
	}
}
